<template>
  <view>
    <canvas class="cv-pic" canvas-id="cv-pic" width="400" height="300"></canvas>
  </view>
</template>

<script>
export default {
  name: "share",
  data() {
    return {

    }
  },
  created() {

  },
  mounted(){
    this.drawCanvas()

  },
  methods: {
    drawCanvas() {
      const ctx = uni.createCanvasContext('cv-pic')
      ctx.setFillStyle('red')
      ctx.fillRect(10, 10, 150, 75)
      ctx.draw()
    }

  }
}

</script>
